/**
 * License Agreement.
 *
 *  SOCO - Extremal Algebra Component Library
 *
 * Copyright (C) 2009  UHK, Czech Republic.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License version 2.1 as published by the Free Software Foundation.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 */

package cz.uhk.max.matrix;

import java.util.List;

public interface IEquation {
	/**
	 * Return maximum vector that can be use to multiply A with B and keep
	 * equation A*x=B*x.
	 * 
	 * @param arow
	 *            Row of some matrix A.
	 * @param brow
	 *            Row of some matrix B.
	 * @return Object of type Matrix, that values is maximum of vector x, that
	 *         can be use in: a(i)*x=b(i)*x, i is index of some row from
	 *         matrices.
	 */
	public Matrix maxXForOneRow(Row arow, Row brow);
	/**
	 * Method order rows of matrices to all rows in matrix A multiply with
	 * bound be greater or equals to rows from matrix B. (A*bound) >= (B*bound)
	 */
	
	public void orderSides(Matrix bound);
	/**
	 * Return maximum vector that can be use to multiply A with B and keep
	 * equation A*x=B*x.
	 * 
	 * @return Object of type Matrix, that values is maximum of vector x, that
	 *         can be use in: A*x=B*x.
	 */
	public Matrix maxX();

	/**
	 * Return matrix with x, if exists. X is matrix, that can be use in equation
	 * A*x=B*x, x >= lowerBound.
	 * 
	 * Solution is finding for one row of matrix.
	 * 
	 * @param arow Some row of matrix A.
	 * 
	 * @param brow
	 *            Some row of matrix B.
	 * @param lowerBound
	 *            Some matrix, that have number of rows the same as number of
	 *            columns in matrix A and matrix B. Parameter lowerBound define
	 *            the least values in matrix x.
	 * 
	 * @return Object of type Matrix, if exists (otherwise null).
	 */
	
	public List<Matrix>  solutionsWithLowerBoundForOneRow(Row arow, Row brow,
			Matrix lowerBound);
	
	/**
	 * Return matrix with x, if exists. X is matrix, that can be use in equation
	 * A*x=B*x, x <= upperBound. A(m,n) B(m,n)
	 * 
	 * Solution is finding for one row of matrix.
	 * 
	 * @param arow
	 *            Some row of matrix A.
	 * @param brow
	 *            Some row of matrix B.
	 * @param upperBound
	 *            Some matrix, that have number of rows the same as number of
	 *            columns in matrix A and matrix B. Parameter upperBound define
	 *            the greatest values in matrix x.
	 * 
	 * @return Object of type Matrix, if exists (otherwise null).
	 */
	public Matrix  solutionWithUpperBoundForOneRow(Row arow, Row brow,
			Matrix upperBound);

	/**
	 * Return matrix with x, if exists. X is matrix, that can be use in equation
	 * A*x=B*x, x >= lowerBound.
	 * 
	 * @return Object of type Matrix, if exists (otherwise null).
	 */
	public List<TreeMatrix>  solutionsWithLowerBound(Matrix A, Matrix B, Matrix lowerBound);

	/**
	 * Return matrix with x, if exists. X is matrix, that can be use in equation
	 * A*x=B*x, x <= upperBound.
	 * 
	 * @return Object of type Matrix, if exists (otherwise null).
	 */
	public Matrix  solutionWithUpperBound(Matrix A, Matrix B, Matrix upperBound);
}
